A technique for connecting a three-state buffer for switching between conduction and blocking of a PWM signal to between a PWM generation circuit and a gate driving circuit, and detecting an abnormal state of a safe stop circuit itself by logical product of a signal outputting an abnormal state of the three-state buffer is known.